<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
	<rich:popupPanel id="#{id}"  modal="true" moveable="false" resizeable="true" followByScroll="true">
		<rich:tree toggleType="client" var="classification" rendered="#{not empty classificationConverter.list}">
			<rich:treeModelRecursiveAdaptor roots="#{classificationConverter.list}" nodes="#{classification.subClassifications}">
				<rich:treeNode>
					<h:outputText id="classificationName" value="#{classification.name}"/>
					<a4j:commandLink render="#{renderTarget}" execute="@this" onclick="#{rich:component(id)}.hide(event); return true;" rendered="#{empty classification.subClassifications}">
	                    #{messages.select}
	                    <f:setPropertyActionListener target="#{target}" value="#{classification}" />
	               	</a4j:commandLink>
	        	</rich:treeNode>
			</rich:treeModelRecursiveAdaptor>
		</rich:tree>
		<f:facet name="controls">
            <h:outputLink value="#" onclick="#{rich:component(id)}.hide(); return false;">X</h:outputLink>
        </f:facet>
	</rich:popupPanel>
</ui:composition>